#div1 {
    width: 100px;
    height: 100px;
    background: red;
    position: absolute;
}

p{
    width: 100px;
    height: 100px;
    border: 1px solid black;
    position: absolute;
    margin: 0;
}
.p{
    margin: 0;
    width: 100px;
    height: 100px;
    border: 1px dashed black;
    position: absolute;
}